﻿#pragma execution_character_set("utf-8")
#ifndef CUSTOMPLOTWRAP_H
#define CUSTOMPLOTWRAP_H
#include <QPointF>
#include <QObject>
#include "qcustomplot.h"

class SpectrumPlotWrap:public QObject
{
    Q_OBJECT
public:
    SpectrumPlotWrap(QCustomPlot *plot);

    void SetXYLabel(QString xLabel,QString yLabel);

    void SetGraph(QStringList names);

    void Plot(const QList<QList<QPointF>> &items);

    void Plot(const QList<QPointF> &item, int index);

    void Clear(int index);

    void SetTitle(QString title);

    void SetColors(QList<QColor> colors);

    int GraphCount();

public slots:
    void mousePress();
    void mouseWheel();
private slots:
    void ShowInitDialog();

private:
    QCustomPlot* _plot;
    QCPTextElement* _title;
    bool _lockAxis=false;
    double _upper=2000;
};

#endif // CUSTOMPLOTWRAP_H
